import React, { Suspense } from 'react';
import ReactDOM from 'react-dom/client';
import '@/assets/styles/common.less'
import { RouterProvider } from 'react-router-dom';
import router from './router';
import { Provider } from 'react-redux'
import store from './store';
// import Toast from './components/Toast';
import Loading from './components/Loading';
const root = ReactDOM.createRoot(
  document.getElementById('root') as HTMLElement
);
root.render(
  <Provider store={store}>
    {/* 可以使用 Suspense 组件 配合路由懒加载，进行加载中的提示 */}
    <Suspense fallback={<Loading />}>
      <RouterProvider router={router} />
    </Suspense>
    {/* <Toast /> */}
  </Provider>
);

